INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY ACCOMPANY THIS DOCUMENT (collectively referred to as TT_Editor) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. The user assumes the entire risk as to the accuracy and the use of TT_Editor. Copyright (C) 1994 Thorp Technology. All Rights Reserved. Thankyou for taking the time to download this program. This is my first shareware release and your comments would be appreciated. What is TT_Editor anyway ? The obvious answer to this is that it’s an MDI version of Notepad. The real purpose of this program is to demonstrate a number of VB programming techniques that may be useful to many VB programmers, and to provide a framework application . In the process of building the framework app, I got carried away and created a Notepad replacement. TT_Editor is an excellent walk-up start for anyone wanting to create a professional looking MDI Visual Basic app. By merely changing a few constants , and using the MDI handling routines you’ve got a lot of the tedious work of creating your app already done. What’s in TT_Editor ? · No VBXs ... None at All. ! All VB source code. No more version headaches ! · Single Bitmap Button Bar. · Linked Button Bar / Menus . · Statusbar. · MS-like Tooltips. · File Manager Drag and Drop · Common Dialogs without using the Commdlg.VBX No VBXs Even standard VB3 VBX’s aren’t used. This way you can be sure you don’t have to worry about version mismatches and other associated headaches. Single Bitmap Button Bar. Our Visual C++ friends have had this luxury for some time. Fed up with buggy and incomplete VBX toolbar button implementations, I created my own. Unlike the commercial VBX’s you’ve probably already bought, this implementation requires you to only provide the "button up" image. The disabled and down images are created at run time. Because the TT_Editor button bar uses the low-calorie image control of VB it probably uses less resources than your VBX . Another nice effect from using the image control is that it never gets or traps the focus, thereby making it ideal in a text editing situation where you don’t wont to lose the focus to a button. The button bar may be a pretty complex piece of code to understand. Like the other features I’ve shown in TT_Editor, it is NOT important you understand exactly how it all works. To add your own button to the button bar just add another image control and add it to the ToolButton control array. Give it an Index in sequence with the other "buttons". Next you’ll have to update the Global Const TOTAL_BUTTONS to reflect the total number of buttons in this app, and assign another constant to give the newly created button a nice way of referring to it. Once you’ve done that , you can move onto binding that button to a menu... read on ! Linked Button Bar / Menus. The truly unique part about this app is the way the buttons are linked to the menus. In all other button bars I’ve come across you have to write code for the button’s events and for the menus’ events. When you disable a menu item, normally you would have to disable the button etc. Now , using the TT_Editor code, all you do is call the procedure Bindmenus when the program starts and the buttons inherit the properties of its associated menu. If the menu item is disabled then your button is disabled, if your button is clicked then your menu item is clicked, if your menu item is checked then your button is toggled down. Simple. Again, you don’t have to delve into the inner workings of the code to use this functionality. By definition, all buttons should have a menu equivalent. If for some reason you don’t want this then you’ll need to create a menu with a blank caption and link your buttons to menu items under that. Just toggle the visibility of the blank caption in the ToolButton_Click event. StatusBar. This is made possible by implementing a permanent background loop. The MainLoop procedure gets called shortly after startup and runs for the duration of the program. It just checks various status criteria and updates the Statusbar accordingly. Why use a VBX when it’s this simple ? You may have reservations about having the loop going endlessly in the background. Do some tests yourself . I think you’ll find the overhead is truly negligible. MS-like Tooltips. By putting a comment in the Tag property of the ToolButtons your buttons will have tool tips like MS word etc. The StatusBar will show status text from the button’s linked menu Tag property. File Manager Drag and Drop. Many of you are probably using a VBX for this too. Again, relying on the background loop, it’s easily done with few API calls. Common Dialogs without using the Commdlg.VBX Why use a VBX when you don’t have to ? I’m not against using VBX’s in general , but I do find it adds more vulnerability to your apps. I really hope VB4 gives us the ability linked compiled code into the .EXE itself. Thorp Technology. Thorp Technology is my company . If you want professional Client-Server VB development then contact me initially via CompuServe on 72557,3632. Neither Thorp Technology or myself are liable for anything arising from the use of this program or code . Can You Use it ? This software is Copyrighted 1994 Thorp Technology. Many hours went into developing the techniques you see here in TT_Editor. If you want to use this code then you must register TT_Editor. TT_Editor and it's code, is NOT free. If you find it useful then register it and I can answer your questions on Compuserve 72557,3632. To Register GO SWREG and register ID 3984. Printing Not Implemented. If there's enough interest I may finish this app by adding Printing and Print Preview facilities. No promises. VB4 Administrators and Beta Testers. I very dissapointed I missed out on this Beta. I've posted over 80 Winbugs for another current beta but I still missed out on the really important one !. If you can somehow get me included I would be very grateful ! Again, your comments would be appreciated. Ron Thorp THORP TECHNOLOGY